package com.wiscamp.ninechapters.tags.domain.repositories;

import com.wiscamp.ninechapters.tags.domain.models.Tag;
import com.wiscamp.ninechapters.tags.domain.models.TagGroup;
import com.wiscamp.ninechapters.tags.domain.models.TagName;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import java.util.Collection;

public interface TagRepository {
    Tag getTag(@Min(0) long tagId);

    Tag getTagByCode(@NotBlank String tagCode, @Min(0) long appId);

    Collection<Tag> getTagsByGroupName(@NotBlank String groupName, @Min(0) long appId);

    Tag getTagByName(@NotBlank String groupName, @NotBlank String tagName, @Min(0) long appId);

    Collection<Tag> getTagsByIds(@NotEmpty Collection<Long> tagIds);

    Collection<TagName> getTagNamesByIds(@NotEmpty Collection<Long> tagIds);

    Tag saveTag(@NotNull Tag tag);

    Collection<TagGroup> getAvailableTagGroups();
}
